﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<HuynhQuangWebsite.Models.HomeListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>
<asp:Content ID="HomeTitle" ContentPlaceHolderID="TitleContent" runat="server">
	Cty TNHH Huynh Quang
</asp:Content>

<asp:Content ID="HomeContent" ContentPlaceHolderID="MainContent" runat="server">
    <section class="pagemid">
<div class="inner">
					
	<div id="main">
		<div class="entry-content">
				
			<div class="one_half">
				<h1><%if (Model != null)
            { %><%=Model.AboutUs.AboutUsTitle%>
          <%} %></h1>
          
                <% if (Model != null)
                   {
                       if (Model.AboutUs.AboutUsDetails.Length > 500)
                       { %>
				    <p><%=Model.AboutUs.AboutUsDetails.Substring(0, 500)%></p>
                <%}
                       else
                       { %>
				        <p><%=Model.AboutUs.AboutUsDetails%> </p>
	            <%}
                   } %>
				<div class="divider_line"></div>							
				<h3>Tại sao chọn Công Ty Huỳnh Quang</h3>
				<ul class="list-check green">
                <%if (Model != null)
                  {
                      if (Model.CompanyStrengthList != null)
                      {
                          foreach (var item in Model.CompanyStrengthList)
                          { %>
                      
                            <li><%=item.CompanyStrengthTitle %></li> 

                      <%  }
                      }
                   }
                 %>
				</ul>
			</div>
			
			<!-- .one_half -->
			<div class="one_half last">
        <%if (Model != null)
              {
                  if (Model.ProjectList != null)
                  {
                      for (int i = 0; i < Model.ProjectList.Count(); i++)
                      {
                          var itemAt = Model.ProjectList.ElementAt(i);
                          if (i % 2 == 0)
                          {%>
				<div class="one_half">
					<h5><%=Html.FriendlyTextUrl(itemAt.ProjectTitle, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%></h5>
					<figure><%=Html.FriendlyImageUrl(itemAt.ProjectImgThumb, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%></figure> 
					<p><%if (itemAt.ProjectInfo.Length > 500)
          {%>
                                <%=itemAt.ProjectInfo.Substring(0, 500) + " ... "%>
                            <%=Html.FriendlyTextUrl("Xem thêm...", "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title",Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%>
                  <%}
          else
          {%>
                      <%=itemAt.ProjectInfo%>
                  <%} %>
					</p>
				</div>
			<%}
                          else
                          {%>
				<div class="one_half last">
					<h5><%=Html.FriendlyTextUrl(itemAt.ProjectTitle, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title",Url.EncodeFriendlyUrl( itemAt.ProjectTitle) } })%></h5>
					<figure><%=Html.FriendlyImageUrl(itemAt.ProjectImgThumb, "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%></figure> 
					<p><%if (itemAt.ProjectInfo.Length > 500)
          {%>
                      <%=itemAt.ProjectInfo.Substring(0, 500) + " ... "%>
                    <%=Html.FriendlyTextUrl("Xem thêm...", "Chi_tiet", "Du_an", new RouteValueDictionary { { "id", itemAt.ProjectID }, { "title", Url.EncodeFriendlyUrl(itemAt.ProjectTitle) } })%>
                      <%}
          else
          {%>
                      <%=itemAt.ProjectInfo%>
                      <%} %>
					</p>
				</div>
				<div class="divider_space"></div>
						<% 
                          }
                      }
                  }
              }%>
							
			</div>
			<!-- .one_half -->
    <!-- main -->
</div>
<!-- .inner -->
</section>
<!-- .pagemid -->
</div>
</asp:Content>
